import datetime
import time

#time format descriptor used in magic db
TIME_FORMAT_MAGICDB_ORIG    = '%Y-%m-%d %H:%M:%S'
TIME_FORMAT_MAGICDB         = '%Y-%d-%m %H:%M:%S'
TIME_FORMAT_MAGIC_API       = '%d%m%Y_%H%M%S'

def getToday():
    now = datetime.datetime.fromtimestamp(time.time())
    begin   = datetime.datetime(now.year, now.month, now.day, 0,0,0,0)
    end     = begin + datetime.timedelta(days=1)
    return (begin, end)

